<template>
  <!-- <mt-preview ref="MtPreviewRef" @on-event-call-back="onEventCallBack"></mt-preview> -->
  <div>1小时：{{ total }}kWh</div>
  <div>1天：{{ (total * 24).toFixed(1) }}kWh</div>
  <div>1星期：{{ (total * 24 * 7).toFixed(1) }}kWh</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { useRoute } from 'vue-router';
const route = useRoute();
const total = ref(0);
total.value = route.query.total;

// import { MtPreview } from '@/export';
// import { onMounted, ref } from 'vue';
// import { ElMessage } from 'element-plus';
// const MtPreviewRef = ref<InstanceType<typeof MtPreview>>();
// const onEventCallBack = (type: string, item_id: string) => {
//   console.log(type, item_id);

//   if (type == 'test-dialog') {
//     ElMessage.success(`获取到了id:${item_id}`);
//   }
// };
// onMounted(() => {
//   MtPreviewRef.value?.setImportJson(JSON.parse(sessionStorage.getItem('exportJson') as any));
// });
</script>
